/*
 * Copyright Radosław Smogura, 2012. All rights reserved.
 *
 * The content of this file is confidential and it is intelectual property
 * of copyright owners.
 * 
 *
 * $URL: http://reprap-ide.googlecode.com/svn/trunk/RepRapIDE/RepRapProject/src/main/java/eu/softper/reprap/generator/GenerationContextImpl.java $
 * $Id: GenerationContextImpl.java 3 2012-11-19 10:58:30Z mail@smogura.eu $
 * $Revision: 3 $
 */
package eu.softper.reprap.generator;

import java.math.BigDecimal;

/**
 *
 * @author Radosław Smogura
 */
public class GenerationContextImpl {
    private static final BigDecimal HALF = new BigDecimal("0.5");
    private static final BigDecimal BD_90 = new BigDecimal("90");
    
    private BigDecimal stepX = BigDecimal.ZERO;
    
    private BigDecimal stepY = BigDecimal.ZERO;
    
    private BigDecimal stepZ = BigDecimal.ZERO;

    private BigDecimal offsetX = BigDecimal.ZERO;
    
    private BigDecimal offsetY = BigDecimal.ZERO;
    
    private BigDecimal offsetZ = BigDecimal.ZERO;
    
    private BigDecimal scaleX = BigDecimal.ONE;
    
    private BigDecimal scaleY = BigDecimal.ONE;
    
    private BigDecimal scaleZ = BigDecimal.ONE;
    
    private BigDecimal layerHeight = HALF;
    
    private GeneratorCache generatorCache = new GeneratorCache();
    
    private BigDecimal evenInfill = BigDecimal.ZERO;
    
    private BigDecimal oddInfill = BD_90;
    
    private BigDecimal infillRadius = HALF;
    
    private BigDecimal infillStep = HALF;
    
    /** This is minimum step size in X direction (like DPI). If this
     * value is not null, then it must be possitive. Depending of implementation
     * of generator this value may cause that some points will be rounded
     * to multiplication of step size, like "snap to grid".
     * @return 
     */
    public BigDecimal getStepX() {
        return stepX;
    }

    public void setStepX(BigDecimal stepX) {
        this.stepX = stepX;
    }

    public BigDecimal getStepY() {
        return stepY;
    }

    public void setStepY(BigDecimal stepY) {
        this.stepY = stepY;
    }

    /** This value really should by postive (but it depends on generator).
     * Other work of it may be simillar to {#getStepX}.
     */
    public BigDecimal getStepZ() {
        return stepZ;
    }

    public void setStepZ(BigDecimal stepZ) {
        this.stepZ = stepZ;
    }

    public BigDecimal getOffsetX() {
        return offsetX;
    }

    public void setOffsetX(BigDecimal offsetX) {
        this.offsetX = offsetX;
    }

    public BigDecimal getOffsetY() {
        return offsetY;
    }

    public void setOffsetY(BigDecimal offsetY) {
        this.offsetY = offsetY;
    }

    public BigDecimal getOffsetZ() {
        return offsetZ;
    }

    public void setOffsetZ(BigDecimal offsetZ) {
        this.offsetZ = offsetZ;
    }

    public BigDecimal getScaleX() {
        return scaleX;
    }

    public void setScaleX(BigDecimal scaleX) {
        this.scaleX = scaleX;
    }

    public BigDecimal getScaleY() {
        return scaleY;
    }

    public void setScaleY(BigDecimal scaleY) {
        this.scaleY = scaleY;
    }

    public BigDecimal getScaleZ() {
        return scaleZ;
    }

    public void setScaleZ(BigDecimal scaleZ) {
        this.scaleZ = scaleZ;
    }

    public GeneratorCache getGeneratorCache() {
        return generatorCache;
    }

    public BigDecimal getLayerHeight() {
        return layerHeight;
    }

    public void setLayerHeight(BigDecimal layerHeight) {
        this.layerHeight = layerHeight;
    }

    public BigDecimal getEvenInfill() {
        return evenInfill;
    }

    public void setEvenInfill(BigDecimal evenInfill) {
        this.evenInfill = evenInfill;
    }

    public BigDecimal getOddInfill() {
        return oddInfill;
    }

    public void setOddInfill(BigDecimal oddInfill) {
        this.oddInfill = oddInfill;
    }

    public BigDecimal getInfillRadius() {
        return infillRadius;
    }

    public void setInfillRadius(BigDecimal infillRadius) {
        this.infillRadius = infillRadius;
    }

    public BigDecimal getInfillStep() {
        return infillStep;
    }

    public void setInfillStep(BigDecimal infillStep) {
        this.infillStep = infillStep;
    }
}
